package model.comparator;

import java.util.Comparator;

import model.Employee;

public class EmployeeWillFlyComparator implements Comparator<Employee>
{
	@Override
	public int compare(Employee e1, Employee e2)
	{
		float willFlyTimeOnThisMonth1 = e1.getWillFlyTimeOnThisMonth(false, null);
		float willFlyTimeOnThisMonth2 = e2.getWillFlyTimeOnThisMonth(false, null);
		if ( willFlyTimeOnThisMonth1 > willFlyTimeOnThisMonth2 )
		{
			return 1;
		}
		else if ( willFlyTimeOnThisMonth1 < willFlyTimeOnThisMonth2 )
		{
			return -1;
		}
		else
		{
			return 0;
		}
	}
}